In C++, initialisation of a struct this way is not allowed if any field is of class type, requiring a constructor. Thus, in particular, this example would not work correctly if name were declared as string, since string is a library class.